import {reqAllUser} from '../../api/index'
Page({
  data:{
    userArr:[]
  },
  onShow(){
    this.getAllUser()
  },
  async getAllUser(){
    const result = await reqAllUser();
    if(result.code === 200){
      this.setData({
        userArr:result.data
      })
    }
  },
  goAdd(event){
    wx.navigateTo({
      url: `/pages/address/add/add?id=${event.currentTarget.dataset.id}`,
    })
  }
})